Repository navigation
Conversation
lfhwnqe
requested review from
atomiks,
colmtuite,
flaviendelangle,
jjenzz and
michaldudak
as code owners
November 15, 2026 11:24
commit: |
Bundle size
PerformanceNo regressions in 36 benchmarks · ran 3m 58s · details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After a modal dialog closes on a backdrop press in a browser that ignores
focus({ preventScroll }), focus can fall back todocument.bodyeven when the app'sfinalFocuscallback returns a specific element. In the reported scenario, this sends the screen reader back to the top of the page.Honor an explicit focus target on this dismissal path. Keep the existing scroll protection when
finalFocusresolves to the default behavior. The target the application explicitly supplies may scroll into view on browsers that ignore the option.Fixes #6161.
To reproduce, render a modal
Dialogwith a backdrop and setDialog.Popup finalFocus={() => continueButton.current}. Open from the trigger, then press the backdrop. On Base UI 1.9.0 (masterat315eba7), with React 19.3.1 and the browser behavior simulated by ignoring focus options, the dialog closes anddocument.activeElementisdocument.body. The same test passes after this change and the explicitly specified Continue button has focus. The control case where the callback returnstruekeeps the existing behavior.Validation on Node 26.11.1:
git diff --checkpassed.AI assistance disclosure: Codex helped reproduce the report, implement the patch and regression, and run the checks above.